Skip to content

Remove relayouting linear weights logic from hf-adapters load-common.py - #280

Merged
arielge merged 3 commits into
torch-spyre:mainfrom
vinithakv:remove-relayout-redundant-logic
Aug 13, 2026
Merged

Remove relayouting linear weights logic from hf-adapters load-common.py#280
arielge merged 3 commits into
torch-spyre:mainfrom
vinithakv:remove-relayout-redundant-logic

Conversation

@vinithakv

Copy link
Copy Markdown
Contributor

The relayouting is handled in torch_spyre/model_utils.py

@vinithakv

Copy link
Copy Markdown
Contributor Author

Tested with and without patch and no significant regression found after removing relayout function from hf-adapters
image

@vinithakv
vinithakv force-pushed the remove-relayout-redundant-logic branch from 920bbfa to 5eb92b6 Compare August 5, 2026 15:46
@vinithakv
vinithakv marked this pull request as ready for review August 5, 2026 15:47
Comment thread hf_adapters/hf_common.py Outdated
Comment thread hf_adapters/hf_common.py Outdated
@@ -1180,47 +1145,7 @@ def _move_to_spyre_with_layout(model, dtype):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now redundant as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(since we have one model.to that is valid for both spyre and cpu)

The relayouting is handled in torch_spyre/model_utils.py

Signed-off-by: Vinitha Vijayan <vinithav@linux.vnet.ibm.com>
Signed-off-by: Vinitha Vijayan <vinithav@linux.vnet.ibm.com>
Signed-off-by: Vinitha Vijayan <vinithav@linux.vnet.ibm.com>
@arielge
arielge force-pushed the remove-relayout-redundant-logic branch from e8d72fb to 0422927 Compare August 13, 2026 12:11
@arielge
arielge enabled auto-merge August 13, 2026 12:12
@arielge
arielge added this pull request to the merge queue Aug 13, 2026
@spyre-ci

spyre-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown

❌ merge-queue-integration: failure

@spyre-ci

spyre-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown

⏳ merge-queue-integration: queued

Merged via the queue into torch-spyre:main with commit fc75f71 Aug 13, 2026
80 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants